﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Gfw.Models.Stock;
using Gfw.Repository;
using NHibernate.Criterion;

namespace Gfw.Repositories.Stock
{
   public class BargainAgencyRepository:Repository<StkBargainagency>
    {
       public IList<StkBargainagency> GetByTradeStatusNotEq(int tradeStatus,string userId)
       {
           var hql =
               "from StkBargainagency where Userid=:userid and TradeStatus<>:tradeStatus order by AgencyDate desc";
           var query = Session.CreateQuery(hql).SetString("userid", userId).SetInt32("tradeStatus", tradeStatus);
          return query.List<StkBargainagency>();
       }
    }
}
